//
//  WhoLookMeController.m
//  Ten
//
//  Created by anfuer on 2018/11/13.
//  Copyright © 2018年 xg韦. All rights reserved.
//

#import "WhoLookMeController.h"
#import "companyCell.h"
#import "UIButton+WebCache.h"
@interface WhoLookMeController ()
{
    NSArray*dataary;
}
@property (weak, nonatomic) IBOutlet UIView *hidenView;
@property (weak, nonatomic) IBOutlet UITableView *tbv;

@end

@implementation WhoLookMeController

- (void)viewDidLoad {
    [super viewDidLoad];
    _tbv.separatorColor=[UIColor clearColor];
    [FuncPublic getData:self parameters:nil RequestUrl:Cwho_see_me success:^(NSDictionary *acountInfo) {
        dataary=acountInfo[@"data"];
            [_tbv reloadData];
    }];

    // Do any additional setup after loading the view.
}


#pragma mark 返回每组行数
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return  dataary.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
{
    
    NSDictionary*dic=dataary[indexPath.row][@"company"];
    companyCell*cell=[companyCell CellWithTableView:tableView];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.lb1.text=WXGStr(dic[@"name"]);
    [cell.imgBtno sd_setImageWithURL:[dic[@"logo"] formatUrl] forState:UIControlStateNormal placeholderImage:WXGImage(@"zhanwei")];
    cell.lb2.text=[NSString stringWithFormat:@"%@查看了我",dataary[indexPath.row][@"add_time"]];
    return cell;

}


#pragma mark 设置每行高度
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 90;
}
#pragma mark 点击事件
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

{
    [MyUtils collviewSelidex:@"公司详情" toVc:self andShopInfo:dataary[indexPath.row][@"company"]];
}





@end
